Skip to content

convert from docker to composite action using gh api#4

Merged
jameskoll-whatnot merged 3 commits intoWhatnot-Inc:masterfrom
ConnorMul:composite-gh-api
Mar 26, 2026
Merged

convert from docker to composite action using gh api#4
jameskoll-whatnot merged 3 commits intoWhatnot-Inc:masterfrom
ConnorMul:composite-gh-api

Conversation

@ConnorMul

Summary

  • Converts the action from Docker-based (runs: using: docker) to composite (runs: using: composite), running entrypoint.sh directly on the runner host instead of inside an Alpine container
  • Replaces all curl calls with gh api, which handles authentication via GH_TOKEN, has built-in retry logic for transient network errors (DNS, connection, timeout), and uses the runner host's DNS resolver
  • Removes the manual transient network error retry logic (curl exit codes 6/7/28/35/56) since gh handles this natively
  • Keeps the 404 retry logic needed for the dispatch-to-run-discovery race condition

Context

Occasional curl: (6) Could not resolve host: api.github.com DNS failures have been observed during the status polling loop. The Docker container's network namespace introduces an extra DNS proxy hop (container -> Docker DNS proxy -> host resolver -> upstream) that can fail independently of the host. Moving to a composite action eliminates this layer and ensures API calls use the host's DNS resolver directly, which benefits from any private network peering configuration.

Breaking changes

None. All inputs, outputs, and behavior are identical. Workflows using Whatnot-Inc/trigger-workflow-and-wait@master require no changes.

🤖 Generated with Claude Code

Replace the Docker-based action with a composite action that runs
directly on the runner host using `gh api` instead of curl. This
eliminates Docker's network namespace as a DNS failure point and
leverages gh's built-in retry logic for transient network errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ConnorMul Connor Mulholland (ConnorMul) requested a review from a team as a code owner March 25, 2026 15:58
gh api does not have built-in retry for transient network errors.
Re-add retry handling by matching on gh's actual stderr error
message strings (verified against cli/cli source):
- DNS: "error connecting to" (gh's special DNSError formatting)
- Connection: "connection refused", "connection reset by peer"
- Timeout: "connection timed out", "operation timed out",
  "context deadline exceeded", "i/o timeout", "TLS handshake timeout"
- Pipe: "broken pipe"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Composite actions run the script directly on the host rather than
via a Docker ENTRYPOINT, so the file needs the executable bit set.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jameskoll-whatnot jameskoll-whatnot merged commit d732c7e into Whatnot-Inc:master Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants